package com.iostream;

import java.io.*;

/**
 * @Author WaveHi
 * @Date 21/8/2021 上午 9:26
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description Test the structure of stream
 */
public class TestStruction {

    public static void main(String[] args) {

        //测试Closeable接口
        Closeable c1 = null;

        //测试AutoCloseable接口
        AutoCloseable as = null;

        //测试Readable接口
        Readable r1 = null;

        //测试Reader类
        Reader reader = null;

        //测试Writer类
        Writer writer = null;

        //测试Appendable接口
        Appendable appendable = null;

        //测试InputStream类
        InputStream inputStream = null;

        //测试OutputStream类
        OutputStream outputStream = null;
        FileOutputStream fos1 = null;
        try {
            //获取数据存取的位置
            fos1 = new FileOutputStream(new File("day11/txt/hello7.txt"),true);

            //获取输出流


            //获取需要输出的数据
            int num1 = 127;

            //输出数据
            fos1.write(num1);
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            //资源的关闭
            if(fos1 != null) {

                try {
                    fos1.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }

            }
        }

        //测试InputStreamReader类
        InputStreamReader inputStreamReader = null;

        //测试FileReader类
        FileReader fr1 = null;

        //测试BufferedReader
        BufferedReader bufferedReader = null;

        //测试OutputStreamWriter类
        OutputStreamWriter outputStreamWriter = null;

        //测试FileWriter
        FileWriter fileWriter = null;

        //测试股BufferedWriter
        BufferedWriter bufferedWriter = null;

        //测试FileInputStream
        FileInputStream fileInputStream = null;

        //测试DataInputStream类
        DataInputStream dataInputStream = null;

        //测试BufferedInputStream类
        BufferedInputStream bufferedInputStream = null;

        //测试FileOutputStream类
        FileOutputStream fileOutputStream = null;

        //测试DataOutputStream类
        DataOutputStream dataoutputStream = null;

        //测试BufferedOutputStream类
        BufferedOutputStream bufferedOutputStream = null;

        //测试RandomAccessFile
        RandomAccessFile randomAccessFile = null;

        //测试股ObjectInputStream类
        ObjectInputStream objectInputStream = null;

        //测试ObjectStreamConstants接口
        ObjectStreamConstants objectStreamConstants = null;

        //侧式ObjectOutput接口
        ObjectOutput objectOutput = null;

    }

}
